package com.example.educational.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.educational.entity.NoticeReceived;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author MySoul
 * @description 针对表【edu_notice_received】的数据库操作Mapper
 * @createDate 2023-05-19 08:43:12
 * @Entity com.example.educational.entity/educationall.NoticeReceived
 */
@Mapper
public interface NoticeReceivedMapper extends BaseMapper<NoticeReceived> {


    @Insert(
            "INSERT INTO edu_notice_received(id, title, category, release_date, img_src, file_src) " +
                    "VALUES (#{id},#{title},#{category},#{release_date},#{img_src},#{file_src})")
    int insertNoticeReceived(@Param("id") String id, @Param("title") String title, @Param("category") String category, @Param("release_date") String releaseDate, @Param("img_src") String imgSrc, @Param("file_src") String fileSrc);

    @Select("SELECT * FROM edu_notice_received WHERE id=#{id}")
    NoticeReceived selectById(@Param("id") String taskId);

    @Select("SELECT file_src FROM edu_notice_received WHERE id = #{id}")
    String selectFileSrcById(@Param("id") String taskId);
}




